﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="OxyPalettes.MatPlotLib.cs" company="OxyPlot">
//   Copyright (c) 2020 OxyPlot contributors
// </copyright>
// <summary>
//   Provides a selection of color palettes from the matplotlib library.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

/*
Colormaps Inferno, Magma, Plasma and Viridis were orignally created by Nathaniel J. Smith, Stefan van der Walt and Eric Firing.
Original source: https://github.com/BIDS/colormap/blob/master/colormaps.py
Released under the CC0 license (public domain).
*/

/*
Colormap Cividis was originally created by Jamie R.Nuñez, Christopher R. Anderton and Ryan S. Renslow.
Original source: https://github.com/pnnl/cmaputil/blob/master/colormaps/cividis.txt
License:

Copyright(c) 2017, Battelle Memorial Institute

1.  Battelle Memorial Institute(hereinafter Battelle) hereby grants
permission to any person or entity lawfully obtaining a copy of this software
and associated documentation files (hereinafter “the Software”) to
redistribute and use the Software in source and binary forms, with or without
modification. Such person or entity may use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and may permit
others to do so, subject to the following conditions:

+ Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimers.

+ Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

+ Other than as used herein, neither the name Battelle Memorial Institute or
Battelle may be used in any form whatsoever without the express written
consent of Battelle.

2.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL BATTELLE OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

namespace OxyPlot
{
    /// <summary>
    /// Provides predefined palettes.
    /// </summary>
    public static partial class OxyPalettes
    {
        /// <summary>
        /// The color sequence of the cividis palette.
        /// </summary>
        private static readonly OxyColor[] cividisColors = new[]
        {
            OxyColor.FromRgb(0, 32, 77),
            OxyColor.FromRgb(0, 33, 78),
            OxyColor.FromRgb(0, 34, 80),
            OxyColor.FromRgb(0, 34, 82),
            OxyColor.FromRgb(0, 35, 83),
            OxyColor.FromRgb(0, 36, 85),
            OxyColor.FromRgb(0, 37, 87),
            OxyColor.FromRgb(0, 37, 88),
            OxyColor.FromRgb(0, 38, 90),
            OxyColor.FromRgb(0, 39, 92),
            OxyColor.FromRgb(0, 39, 94),
            OxyColor.FromRgb(0, 40, 96),
            OxyColor.FromRgb(0, 41, 97),
            OxyColor.FromRgb(0, 42, 99),
            OxyColor.FromRgb(0, 42, 101),
            OxyColor.FromRgb(0, 43, 103),
            OxyColor.FromRgb(0, 44, 105),
            OxyColor.FromRgb(0, 44, 106),
            OxyColor.FromRgb(0, 45, 108),
            OxyColor.FromRgb(0, 46, 110),
            OxyColor.FromRgb(0, 46, 111),
            OxyColor.FromRgb(0, 47, 111),
            OxyColor.FromRgb(0, 47, 111),
            OxyColor.FromRgb(0, 48, 111),
            OxyColor.FromRgb(0, 48, 111),
            OxyColor.FromRgb(0, 49, 111),
            OxyColor.FromRgb(0, 50, 111),
            OxyColor.FromRgb(0, 51, 111),
            OxyColor.FromRgb(0, 51, 111),
            OxyColor.FromRgb(0, 52, 111),
            OxyColor.FromRgb(0, 53, 110),
            OxyColor.FromRgb(1, 54, 110),
            OxyColor.FromRgb(6, 54, 110),
            OxyColor.FromRgb(11, 55, 110),
            OxyColor.FromRgb(15, 56, 110),
            OxyColor.FromRgb(18, 56, 109),
            OxyColor.FromRgb(21, 57, 109),
            OxyColor.FromRgb(24, 58, 109),
            OxyColor.FromRgb(26, 59, 109),
            OxyColor.FromRgb(29, 59, 109),
            OxyColor.FromRgb(31, 60, 109),
            OxyColor.FromRgb(33, 61, 109),
            OxyColor.FromRgb(35, 62, 108),
            OxyColor.FromRgb(36, 62, 108),
            OxyColor.FromRgb(38, 63, 108),
            OxyColor.FromRgb(40, 64, 108),
            OxyColor.FromRgb(42, 64, 108),
            OxyColor.FromRgb(43, 65, 108),
            OxyColor.FromRgb(45, 66, 108),
            OxyColor.FromRgb(46, 67, 108),
            OxyColor.FromRgb(48, 67, 108),
            OxyColor.FromRgb(49, 68, 107),
            OxyColor.FromRgb(50, 69, 107),
            OxyColor.FromRgb(52, 69, 107),
            OxyColor.FromRgb(53, 70, 107),
            OxyColor.FromRgb(54, 71, 107),
            OxyColor.FromRgb(56, 72, 107),
            OxyColor.FromRgb(57, 72, 107),
            OxyColor.FromRgb(58, 73, 107),
            OxyColor.FromRgb(59, 74, 107),
            OxyColor.FromRgb(61, 74, 107),
            OxyColor.FromRgb(62, 75, 107),
            OxyColor.FromRgb(63, 76, 107),
            OxyColor.FromRgb(64, 77, 107),
            OxyColor.FromRgb(65, 77, 107),
            OxyColor.FromRgb(66, 78, 107),
            OxyColor.FromRgb(67, 79, 107),
            OxyColor.FromRgb(68, 79, 107),
            OxyColor.FromRgb(70, 80, 107),
            OxyColor.FromRgb(71, 81, 107),
            OxyColor.FromRgb(72, 82, 107),
            OxyColor.FromRgb(73, 82, 107),
            OxyColor.FromRgb(74, 83, 107),
            OxyColor.FromRgb(75, 84, 108),
            OxyColor.FromRgb(76, 84, 108),
            OxyColor.FromRgb(77, 85, 108),
            OxyColor.FromRgb(78, 86, 108),
            OxyColor.FromRgb(79, 87, 108),
            OxyColor.FromRgb(80, 87, 108),
            OxyColor.FromRgb(81, 88, 108),
            OxyColor.FromRgb(82, 89, 108),
            OxyColor.FromRgb(83, 89, 108),
            OxyColor.FromRgb(84, 90, 108),
            OxyColor.FromRgb(85, 91, 109),
            OxyColor.FromRgb(86, 92, 109),
            OxyColor.FromRgb(87, 92, 109),
            OxyColor.FromRgb(88, 93, 109),
            OxyColor.FromRgb(89, 94, 109),
            OxyColor.FromRgb(89, 95, 109),
            OxyColor.FromRgb(90, 95, 109),
            OxyColor.FromRgb(91, 96, 110),
            OxyColor.FromRgb(92, 97, 110),
            OxyColor.FromRgb(93, 97, 110),
            OxyColor.FromRgb(94, 98, 110),
            OxyColor.FromRgb(95, 99, 110),
            OxyColor.FromRgb(96, 100, 111),
            OxyColor.FromRgb(97, 100, 111),
            OxyColor.FromRgb(98, 101, 111),
            OxyColor.FromRgb(99, 102, 111),
            OxyColor.FromRgb(100, 102, 111),
            OxyColor.FromRgb(100, 103, 112),
            OxyColor.FromRgb(101, 104, 112),
            OxyColor.FromRgb(102, 105, 112),
            OxyColor.FromRgb(103, 105, 112),
            OxyColor.FromRgb(104, 106, 113),
            OxyColor.FromRgb(105, 107, 113),
            OxyColor.FromRgb(106, 108, 113),
            OxyColor.FromRgb(107, 108, 113),
            OxyColor.FromRgb(108, 109, 114),
            OxyColor.FromRgb(108, 110, 114),
            OxyColor.FromRgb(109, 110, 114),
            OxyColor.FromRgb(110, 111, 115),
            OxyColor.FromRgb(111, 112, 115),
            OxyColor.FromRgb(112, 113, 115),
            OxyColor.FromRgb(113, 113, 116),
            OxyColor.FromRgb(114, 114, 116),
            OxyColor.FromRgb(114, 115, 116),
            OxyColor.FromRgb(115, 116, 117),
            OxyColor.FromRgb(116, 116, 117),
            OxyColor.FromRgb(117, 117, 117),
            OxyColor.FromRgb(118, 118, 118),
            OxyColor.FromRgb(119, 119, 118),
            OxyColor.FromRgb(120, 119, 119),
            OxyColor.FromRgb(120, 120, 119),
            OxyColor.FromRgb(121, 121, 119),
            OxyColor.FromRgb(122, 122, 120),
            OxyColor.FromRgb(123, 122, 120),
            OxyColor.FromRgb(124, 123, 120),
            OxyColor.FromRgb(125, 124, 120),
            OxyColor.FromRgb(126, 125, 120),
            OxyColor.FromRgb(127, 125, 120),
            OxyColor.FromRgb(128, 126, 121),
            OxyColor.FromRgb(129, 127, 121),
            OxyColor.FromRgb(130, 128, 121),
            OxyColor.FromRgb(131, 128, 121),
            OxyColor.FromRgb(132, 129, 121),
            OxyColor.FromRgb(132, 130, 121),
            OxyColor.FromRgb(133, 131, 121),
            OxyColor.FromRgb(134, 131, 121),
            OxyColor.FromRgb(135, 132, 121),
            OxyColor.FromRgb(136, 133, 121),
            OxyColor.FromRgb(137, 134, 121),
            OxyColor.FromRgb(138, 135, 121),
            OxyColor.FromRgb(139, 135, 121),
            OxyColor.FromRgb(140, 136, 121),
            OxyColor.FromRgb(141, 137, 121),
            OxyColor.FromRgb(142, 138, 121),
            OxyColor.FromRgb(143, 138, 121),
            OxyColor.FromRgb(144, 139, 121),
            OxyColor.FromRgb(145, 140, 120),
            OxyColor.FromRgb(146, 141, 120),
            OxyColor.FromRgb(147, 142, 120),
            OxyColor.FromRgb(148, 142, 120),
            OxyColor.FromRgb(149, 143, 120),
            OxyColor.FromRgb(150, 144, 120),
            OxyColor.FromRgb(151, 145, 120),
            OxyColor.FromRgb(152, 146, 120),
            OxyColor.FromRgb(153, 146, 120),
            OxyColor.FromRgb(154, 147, 119),
            OxyColor.FromRgb(155, 148, 119),
            OxyColor.FromRgb(156, 149, 119),
            OxyColor.FromRgb(157, 150, 119),
            OxyColor.FromRgb(158, 150, 119),
            OxyColor.FromRgb(159, 151, 119),
            OxyColor.FromRgb(160, 152, 119),
            OxyColor.FromRgb(161, 153, 118),
            OxyColor.FromRgb(162, 154, 118),
            OxyColor.FromRgb(163, 154, 118),
            OxyColor.FromRgb(164, 155, 118),
            OxyColor.FromRgb(165, 156, 118),
            OxyColor.FromRgb(166, 157, 117),
            OxyColor.FromRgb(168, 158, 117),
            OxyColor.FromRgb(169, 159, 117),
            OxyColor.FromRgb(170, 159, 117),
            OxyColor.FromRgb(171, 160, 116),
            OxyColor.FromRgb(172, 161, 116),
            OxyColor.FromRgb(173, 162, 116),
            OxyColor.FromRgb(174, 163, 116),
            OxyColor.FromRgb(175, 164, 115),
            OxyColor.FromRgb(176, 164, 115),
            OxyColor.FromRgb(177, 165, 115),
            OxyColor.FromRgb(178, 166, 114),
            OxyColor.FromRgb(179, 167, 114),
            OxyColor.FromRgb(180, 168, 114),
            OxyColor.FromRgb(181, 169, 113),
            OxyColor.FromRgb(182, 169, 113),
            OxyColor.FromRgb(183, 170, 113),
            OxyColor.FromRgb(184, 171, 112),
            OxyColor.FromRgb(185, 172, 112),
            OxyColor.FromRgb(186, 173, 112),
            OxyColor.FromRgb(187, 174, 111),
            OxyColor.FromRgb(188, 175, 111),
            OxyColor.FromRgb(190, 175, 111),
            OxyColor.FromRgb(191, 176, 110),
            OxyColor.FromRgb(192, 177, 110),
            OxyColor.FromRgb(193, 178, 109),
            OxyColor.FromRgb(194, 179, 109),
            OxyColor.FromRgb(195, 180, 109),
            OxyColor.FromRgb(196, 181, 108),
            OxyColor.FromRgb(197, 181, 108),
            OxyColor.FromRgb(198, 182, 107),
            OxyColor.FromRgb(199, 183, 107),
            OxyColor.FromRgb(200, 184, 106),
            OxyColor.FromRgb(201, 185, 106),
            OxyColor.FromRgb(203, 186, 105),
            OxyColor.FromRgb(204, 187, 105),
            OxyColor.FromRgb(205, 188, 104),
            OxyColor.FromRgb(206, 188, 104),
            OxyColor.FromRgb(207, 189, 103),
            OxyColor.FromRgb(208, 190, 103),
            OxyColor.FromRgb(209, 191, 102),
            OxyColor.FromRgb(210, 192, 102),
            OxyColor.FromRgb(211, 193, 101),
            OxyColor.FromRgb(212, 194, 100),
            OxyColor.FromRgb(214, 195, 100),
            OxyColor.FromRgb(215, 196, 99),
            OxyColor.FromRgb(216, 197, 99),
            OxyColor.FromRgb(217, 197, 98),
            OxyColor.FromRgb(218, 198, 97),
            OxyColor.FromRgb(219, 199, 97),
            OxyColor.FromRgb(220, 200, 96),
            OxyColor.FromRgb(221, 201, 95),
            OxyColor.FromRgb(222, 202, 95),
            OxyColor.FromRgb(224, 203, 94),
            OxyColor.FromRgb(225, 204, 93),
            OxyColor.FromRgb(226, 205, 92),
            OxyColor.FromRgb(227, 206, 92),
            OxyColor.FromRgb(228, 207, 91),
            OxyColor.FromRgb(229, 208, 90),
            OxyColor.FromRgb(230, 209, 89),
            OxyColor.FromRgb(232, 210, 89),
            OxyColor.FromRgb(233, 211, 88),
            OxyColor.FromRgb(234, 211, 87),
            OxyColor.FromRgb(235, 212, 86),
            OxyColor.FromRgb(236, 213, 85),
            OxyColor.FromRgb(237, 214, 84),
            OxyColor.FromRgb(239, 215, 83),
            OxyColor.FromRgb(240, 216, 82),
            OxyColor.FromRgb(241, 217, 81),
            OxyColor.FromRgb(242, 218, 80),
            OxyColor.FromRgb(243, 219, 79),
            OxyColor.FromRgb(244, 220, 78),
            OxyColor.FromRgb(246, 221, 77),
            OxyColor.FromRgb(247, 222, 76),
            OxyColor.FromRgb(248, 223, 75),
            OxyColor.FromRgb(249, 224, 74),
            OxyColor.FromRgb(250, 225, 73),
            OxyColor.FromRgb(251, 226, 72),
            OxyColor.FromRgb(253, 227, 70),
            OxyColor.FromRgb(254, 228, 69),
            OxyColor.FromRgb(255, 229, 68),
            OxyColor.FromRgb(255, 230, 66),
            OxyColor.FromRgb(255, 231, 66),
            OxyColor.FromRgb(255, 232, 67),
            OxyColor.FromRgb(255, 233, 68),
            OxyColor.FromRgb(255, 234, 70)
        };

        /// <summary>
        /// The color sequence of the inferno palette.
        /// </summary>
        private static readonly OxyColor[] infernoColors = new[]
        {
            OxyColor.FromRgb(0, 0, 4),
            OxyColor.FromRgb(1, 0, 5),
            OxyColor.FromRgb(1, 1, 6),
            OxyColor.FromRgb(1, 1, 8),
            OxyColor.FromRgb(2, 1, 10),
            OxyColor.FromRgb(2, 2, 12),
            OxyColor.FromRgb(2, 2, 14),
            OxyColor.FromRgb(3, 2, 16),
            OxyColor.FromRgb(4, 3, 18),
            OxyColor.FromRgb(4, 3, 20),
            OxyColor.FromRgb(5, 4, 23),
            OxyColor.FromRgb(6, 4, 25),
            OxyColor.FromRgb(7, 5, 27),
            OxyColor.FromRgb(8, 5, 29),
            OxyColor.FromRgb(9, 6, 31),
            OxyColor.FromRgb(10, 7, 34),
            OxyColor.FromRgb(11, 7, 36),
            OxyColor.FromRgb(12, 8, 38),
            OxyColor.FromRgb(13, 8, 41),
            OxyColor.FromRgb(14, 9, 43),
            OxyColor.FromRgb(16, 9, 45),
            OxyColor.FromRgb(17, 10, 48),
            OxyColor.FromRgb(18, 10, 50),
            OxyColor.FromRgb(20, 11, 52),
            OxyColor.FromRgb(21, 11, 55),
            OxyColor.FromRgb(22, 11, 57),
            OxyColor.FromRgb(24, 12, 60),
            OxyColor.FromRgb(25, 12, 62),
            OxyColor.FromRgb(27, 12, 65),
            OxyColor.FromRgb(28, 12, 67),
            OxyColor.FromRgb(30, 12, 69),
            OxyColor.FromRgb(31, 12, 72),
            OxyColor.FromRgb(33, 12, 74),
            OxyColor.FromRgb(35, 12, 76),
            OxyColor.FromRgb(36, 12, 79),
            OxyColor.FromRgb(38, 12, 81),
            OxyColor.FromRgb(40, 11, 83),
            OxyColor.FromRgb(41, 11, 85),
            OxyColor.FromRgb(43, 11, 87),
            OxyColor.FromRgb(45, 11, 89),
            OxyColor.FromRgb(47, 10, 91),
            OxyColor.FromRgb(49, 10, 92),
            OxyColor.FromRgb(50, 10, 94),
            OxyColor.FromRgb(52, 10, 95),
            OxyColor.FromRgb(54, 9, 97),
            OxyColor.FromRgb(56, 9, 98),
            OxyColor.FromRgb(57, 9, 99),
            OxyColor.FromRgb(59, 9, 100),
            OxyColor.FromRgb(61, 9, 101),
            OxyColor.FromRgb(62, 9, 102),
            OxyColor.FromRgb(64, 10, 103),
            OxyColor.FromRgb(66, 10, 104),
            OxyColor.FromRgb(68, 10, 104),
            OxyColor.FromRgb(69, 10, 105),
            OxyColor.FromRgb(71, 11, 106),
            OxyColor.FromRgb(73, 11, 106),
            OxyColor.FromRgb(74, 12, 107),
            OxyColor.FromRgb(76, 12, 107),
            OxyColor.FromRgb(77, 13, 108),
            OxyColor.FromRgb(79, 13, 108),
            OxyColor.FromRgb(81, 14, 108),
            OxyColor.FromRgb(82, 14, 109),
            OxyColor.FromRgb(84, 15, 109),
            OxyColor.FromRgb(85, 15, 109),
            OxyColor.FromRgb(87, 16, 110),
            OxyColor.FromRgb(89, 16, 110),
            OxyColor.FromRgb(90, 17, 110),
            OxyColor.FromRgb(92, 18, 110),
            OxyColor.FromRgb(93, 18, 110),
            OxyColor.FromRgb(95, 19, 110),
            OxyColor.FromRgb(97, 19, 110),
            OxyColor.FromRgb(98, 20, 110),
            OxyColor.FromRgb(100, 21, 110),
            OxyColor.FromRgb(101, 21, 110),
            OxyColor.FromRgb(103, 22, 110),
            OxyColor.FromRgb(105, 22, 110),
            OxyColor.FromRgb(106, 23, 110),
            OxyColor.FromRgb(108, 24, 110),
            OxyColor.FromRgb(109, 24, 110),
            OxyColor.FromRgb(111, 25, 110),
            OxyColor.FromRgb(113, 25, 110),
            OxyColor.FromRgb(114, 26, 110),
            OxyColor.FromRgb(116, 26, 110),
            OxyColor.FromRgb(117, 27, 110),
            OxyColor.FromRgb(119, 28, 109),
            OxyColor.FromRgb(120, 28, 109),
            OxyColor.FromRgb(122, 29, 109),
            OxyColor.FromRgb(124, 29, 109),
            OxyColor.FromRgb(125, 30, 109),
            OxyColor.FromRgb(127, 30, 108),
            OxyColor.FromRgb(128, 31, 108),
            OxyColor.FromRgb(130, 32, 108),
            OxyColor.FromRgb(132, 32, 107),
            OxyColor.FromRgb(133, 33, 107),
            OxyColor.FromRgb(135, 33, 107),
            OxyColor.FromRgb(136, 34, 106),
            OxyColor.FromRgb(138, 34, 106),
            OxyColor.FromRgb(140, 35, 105),
            OxyColor.FromRgb(141, 35, 105),
            OxyColor.FromRgb(143, 36, 105),
            OxyColor.FromRgb(144, 37, 104),
            OxyColor.FromRgb(146, 37, 104),
            OxyColor.FromRgb(147, 38, 103),
            OxyColor.FromRgb(149, 38, 103),
            OxyColor.FromRgb(151, 39, 102),
            OxyColor.FromRgb(152, 39, 102),
            OxyColor.FromRgb(154, 40, 101),
            OxyColor.FromRgb(155, 41, 100),
            OxyColor.FromRgb(157, 41, 100),
            OxyColor.FromRgb(159, 42, 99),
            OxyColor.FromRgb(160, 42, 99),
            OxyColor.FromRgb(162, 43, 98),
            OxyColor.FromRgb(163, 44, 97),
            OxyColor.FromRgb(165, 44, 96),
            OxyColor.FromRgb(166, 45, 96),
            OxyColor.FromRgb(168, 46, 95),
            OxyColor.FromRgb(169, 46, 94),
            OxyColor.FromRgb(171, 47, 94),
            OxyColor.FromRgb(173, 48, 93),
            OxyColor.FromRgb(174, 48, 92),
            OxyColor.FromRgb(176, 49, 91),
            OxyColor.FromRgb(177, 50, 90),
            OxyColor.FromRgb(179, 50, 90),
            OxyColor.FromRgb(180, 51, 89),
            OxyColor.FromRgb(182, 52, 88),
            OxyColor.FromRgb(183, 53, 87),
            OxyColor.FromRgb(185, 53, 86),
            OxyColor.FromRgb(186, 54, 85),
            OxyColor.FromRgb(188, 55, 84),
            OxyColor.FromRgb(189, 56, 83),
            OxyColor.FromRgb(191, 57, 82),
            OxyColor.FromRgb(192, 58, 81),
            OxyColor.FromRgb(193, 58, 80),
            OxyColor.FromRgb(195, 59, 79),
            OxyColor.FromRgb(196, 60, 78),
            OxyColor.FromRgb(198, 61, 77),
            OxyColor.FromRgb(199, 62, 76),
            OxyColor.FromRgb(200, 63, 75),
            OxyColor.FromRgb(202, 64, 74),
            OxyColor.FromRgb(203, 65, 73),
            OxyColor.FromRgb(204, 66, 72),
            OxyColor.FromRgb(206, 67, 71),
            OxyColor.FromRgb(207, 68, 70),
            OxyColor.FromRgb(208, 69, 69),
            OxyColor.FromRgb(210, 70, 68),
            OxyColor.FromRgb(211, 71, 67),
            OxyColor.FromRgb(212, 72, 66),
            OxyColor.FromRgb(213, 74, 65),
            OxyColor.FromRgb(215, 75, 63),
            OxyColor.FromRgb(216, 76, 62),
            OxyColor.FromRgb(217, 77, 61),
            OxyColor.FromRgb(218, 78, 60),
            OxyColor.FromRgb(219, 80, 59),
            OxyColor.FromRgb(221, 81, 58),
            OxyColor.FromRgb(222, 82, 56),
            OxyColor.FromRgb(223, 83, 55),
            OxyColor.FromRgb(224, 85, 54),
            OxyColor.FromRgb(225, 86, 53),
            OxyColor.FromRgb(226, 87, 52),
            OxyColor.FromRgb(227, 89, 51),
            OxyColor.FromRgb(228, 90, 49),
            OxyColor.FromRgb(229, 92, 48),
            OxyColor.FromRgb(230, 93, 47),
            OxyColor.FromRgb(231, 94, 46),
            OxyColor.FromRgb(232, 96, 45),
            OxyColor.FromRgb(233, 97, 43),
            OxyColor.FromRgb(234, 99, 42),
            OxyColor.FromRgb(235, 100, 41),
            OxyColor.FromRgb(235, 102, 40),
            OxyColor.FromRgb(236, 103, 38),
            OxyColor.FromRgb(237, 105, 37),
            OxyColor.FromRgb(238, 106, 36),
            OxyColor.FromRgb(239, 108, 35),
            OxyColor.FromRgb(239, 110, 33),
            OxyColor.FromRgb(240, 111, 32),
            OxyColor.FromRgb(241, 113, 31),
            OxyColor.FromRgb(241, 115, 29),
            OxyColor.FromRgb(242, 116, 28),
            OxyColor.FromRgb(243, 118, 27),
            OxyColor.FromRgb(243, 120, 25),
            OxyColor.FromRgb(244, 121, 24),
            OxyColor.FromRgb(245, 123, 23),
            OxyColor.FromRgb(245, 125, 21),
            OxyColor.FromRgb(246, 126, 20),
            OxyColor.FromRgb(246, 128, 19),
            OxyColor.FromRgb(247, 130, 18),
            OxyColor.FromRgb(247, 132, 16),
            OxyColor.FromRgb(248, 133, 15),
            OxyColor.FromRgb(248, 135, 14),
            OxyColor.FromRgb(248, 137, 12),
            OxyColor.FromRgb(249, 139, 11),
            OxyColor.FromRgb(249, 140, 10),
            OxyColor.FromRgb(249, 142, 9),
            OxyColor.FromRgb(250, 144, 8),
            OxyColor.FromRgb(250, 146, 7),
            OxyColor.FromRgb(250, 148, 7),
            OxyColor.FromRgb(251, 150, 6),
            OxyColor.FromRgb(251, 151, 6),
            OxyColor.FromRgb(251, 153, 6),
            OxyColor.FromRgb(251, 155, 6),
            OxyColor.FromRgb(251, 157, 7),
            OxyColor.FromRgb(252, 159, 7),
            OxyColor.FromRgb(252, 161, 8),
            OxyColor.FromRgb(252, 163, 9),
            OxyColor.FromRgb(252, 165, 10),
            OxyColor.FromRgb(252, 166, 12),
            OxyColor.FromRgb(252, 168, 13),
            OxyColor.FromRgb(252, 170, 15),
            OxyColor.FromRgb(252, 172, 17),
            OxyColor.FromRgb(252, 174, 18),
            OxyColor.FromRgb(252, 176, 20),
            OxyColor.FromRgb(252, 178, 22),
            OxyColor.FromRgb(252, 180, 24),
            OxyColor.FromRgb(251, 182, 26),
            OxyColor.FromRgb(251, 184, 29),
            OxyColor.FromRgb(251, 186, 31),
            OxyColor.FromRgb(251, 188, 33),
            OxyColor.FromRgb(251, 190, 35),
            OxyColor.FromRgb(250, 192, 38),
            OxyColor.FromRgb(250, 194, 40),
            OxyColor.FromRgb(250, 196, 42),
            OxyColor.FromRgb(250, 198, 45),
            OxyColor.FromRgb(249, 199, 47),
            OxyColor.FromRgb(249, 201, 50),
            OxyColor.FromRgb(249, 203, 53),
            OxyColor.FromRgb(248, 205, 55),
            OxyColor.FromRgb(248, 207, 58),
            OxyColor.FromRgb(247, 209, 61),
            OxyColor.FromRgb(247, 211, 64),
            OxyColor.FromRgb(246, 213, 67),
            OxyColor.FromRgb(246, 215, 70),
            OxyColor.FromRgb(245, 217, 73),
            OxyColor.FromRgb(245, 219, 76),
            OxyColor.FromRgb(244, 221, 79),
            OxyColor.FromRgb(244, 223, 83),
            OxyColor.FromRgb(244, 225, 86),
            OxyColor.FromRgb(243, 227, 90),
            OxyColor.FromRgb(243, 229, 93),
            OxyColor.FromRgb(242, 230, 97),
            OxyColor.FromRgb(242, 232, 101),
            OxyColor.FromRgb(242, 234, 105),
            OxyColor.FromRgb(241, 236, 109),
            OxyColor.FromRgb(241, 237, 113),
            OxyColor.FromRgb(241, 239, 117),
            OxyColor.FromRgb(241, 241, 121),
            OxyColor.FromRgb(242, 242, 125),
            OxyColor.FromRgb(242, 244, 130),
            OxyColor.FromRgb(243, 245, 134),
            OxyColor.FromRgb(243, 246, 138),
            OxyColor.FromRgb(244, 248, 142),
            OxyColor.FromRgb(245, 249, 146),
            OxyColor.FromRgb(246, 250, 150),
            OxyColor.FromRgb(248, 251, 154),
            OxyColor.FromRgb(249, 252, 157),
            OxyColor.FromRgb(250, 253, 161),
            OxyColor.FromRgb(252, 255, 164)
        };

        /// <summary>
        /// The color sequence of the magma palette.
        /// </summary>
        private static readonly OxyColor[] magmaColors = new[]
                        {
            OxyColor.FromRgb(0, 0, 4),
            OxyColor.FromRgb(1, 0, 5),
            OxyColor.FromRgb(1, 1, 6),
            OxyColor.FromRgb(1, 1, 8),
            OxyColor.FromRgb(2, 1, 9),
            OxyColor.FromRgb(2, 2, 11),
            OxyColor.FromRgb(2, 2, 13),
            OxyColor.FromRgb(3, 3, 15),
            OxyColor.FromRgb(3, 3, 18),
            OxyColor.FromRgb(4, 4, 20),
            OxyColor.FromRgb(5, 4, 22),
            OxyColor.FromRgb(6, 5, 24),
            OxyColor.FromRgb(6, 5, 26),
            OxyColor.FromRgb(7, 6, 28),
            OxyColor.FromRgb(8, 7, 30),
            OxyColor.FromRgb(9, 7, 32),
            OxyColor.FromRgb(10, 8, 34),
            OxyColor.FromRgb(11, 9, 36),
            OxyColor.FromRgb(12, 9, 38),
            OxyColor.FromRgb(13, 10, 41),
            OxyColor.FromRgb(14, 11, 43),
            OxyColor.FromRgb(16, 11, 45),
            OxyColor.FromRgb(17, 12, 47),
            OxyColor.FromRgb(18, 13, 49),
            OxyColor.FromRgb(19, 13, 52),
            OxyColor.FromRgb(20, 14, 54),
            OxyColor.FromRgb(21, 14, 56),
            OxyColor.FromRgb(22, 15, 59),
            OxyColor.FromRgb(24, 15, 61),
            OxyColor.FromRgb(25, 16, 63),
            OxyColor.FromRgb(26, 16, 66),
            OxyColor.FromRgb(28, 16, 68),
            OxyColor.FromRgb(29, 17, 71),
            OxyColor.FromRgb(30, 17, 73),
            OxyColor.FromRgb(32, 17, 75),
            OxyColor.FromRgb(33, 17, 78),
            OxyColor.FromRgb(34, 17, 80),
            OxyColor.FromRgb(36, 18, 83),
            OxyColor.FromRgb(37, 18, 85),
            OxyColor.FromRgb(39, 18, 88),
            OxyColor.FromRgb(41, 17, 90),
            OxyColor.FromRgb(42, 17, 92),
            OxyColor.FromRgb(44, 17, 95),
            OxyColor.FromRgb(45, 17, 97),
            OxyColor.FromRgb(47, 17, 99),
            OxyColor.FromRgb(49, 17, 101),
            OxyColor.FromRgb(51, 16, 103),
            OxyColor.FromRgb(52, 16, 105),
            OxyColor.FromRgb(54, 16, 107),
            OxyColor.FromRgb(56, 16, 108),
            OxyColor.FromRgb(57, 15, 110),
            OxyColor.FromRgb(59, 15, 112),
            OxyColor.FromRgb(61, 15, 113),
            OxyColor.FromRgb(63, 15, 114),
            OxyColor.FromRgb(64, 15, 116),
            OxyColor.FromRgb(66, 15, 117),
            OxyColor.FromRgb(68, 15, 118),
            OxyColor.FromRgb(69, 16, 119),
            OxyColor.FromRgb(71, 16, 120),
            OxyColor.FromRgb(73, 16, 120),
            OxyColor.FromRgb(74, 16, 121),
            OxyColor.FromRgb(76, 17, 122),
            OxyColor.FromRgb(78, 17, 123),
            OxyColor.FromRgb(79, 18, 123),
            OxyColor.FromRgb(81, 18, 124),
            OxyColor.FromRgb(82, 19, 124),
            OxyColor.FromRgb(84, 19, 125),
            OxyColor.FromRgb(86, 20, 125),
            OxyColor.FromRgb(87, 21, 126),
            OxyColor.FromRgb(89, 21, 126),
            OxyColor.FromRgb(90, 22, 126),
            OxyColor.FromRgb(92, 22, 127),
            OxyColor.FromRgb(93, 23, 127),
            OxyColor.FromRgb(95, 24, 127),
            OxyColor.FromRgb(96, 24, 128),
            OxyColor.FromRgb(98, 25, 128),
            OxyColor.FromRgb(100, 26, 128),
            OxyColor.FromRgb(101, 26, 128),
            OxyColor.FromRgb(103, 27, 128),
            OxyColor.FromRgb(104, 28, 129),
            OxyColor.FromRgb(106, 28, 129),
            OxyColor.FromRgb(107, 29, 129),
            OxyColor.FromRgb(109, 29, 129),
            OxyColor.FromRgb(110, 30, 129),
            OxyColor.FromRgb(112, 31, 129),
            OxyColor.FromRgb(114, 31, 129),
            OxyColor.FromRgb(115, 32, 129),
            OxyColor.FromRgb(117, 33, 129),
            OxyColor.FromRgb(118, 33, 129),
            OxyColor.FromRgb(120, 34, 129),
            OxyColor.FromRgb(121, 34, 130),
            OxyColor.FromRgb(123, 35, 130),
            OxyColor.FromRgb(124, 35, 130),
            OxyColor.FromRgb(126, 36, 130),
            OxyColor.FromRgb(128, 37, 130),
            OxyColor.FromRgb(129, 37, 129),
            OxyColor.FromRgb(131, 38, 129),
            OxyColor.FromRgb(132, 38, 129),
            OxyColor.FromRgb(134, 39, 129),
            OxyColor.FromRgb(136, 39, 129),
            OxyColor.FromRgb(137, 40, 129),
            OxyColor.FromRgb(139, 41, 129),
            OxyColor.FromRgb(140, 41, 129),
            OxyColor.FromRgb(142, 42, 129),
            OxyColor.FromRgb(144, 42, 129),
            OxyColor.FromRgb(145, 43, 129),
            OxyColor.FromRgb(147, 43, 128),
            OxyColor.FromRgb(148, 44, 128),
            OxyColor.FromRgb(150, 44, 128),
            OxyColor.FromRgb(152, 45, 128),
            OxyColor.FromRgb(153, 45, 128),
            OxyColor.FromRgb(155, 46, 127),
            OxyColor.FromRgb(156, 46, 127),
            OxyColor.FromRgb(158, 47, 127),
            OxyColor.FromRgb(160, 47, 127),
            OxyColor.FromRgb(161, 48, 126),
            OxyColor.FromRgb(163, 48, 126),
            OxyColor.FromRgb(165, 49, 126),
            OxyColor.FromRgb(166, 49, 125),
            OxyColor.FromRgb(168, 50, 125),
            OxyColor.FromRgb(170, 51, 125),
            OxyColor.FromRgb(171, 51, 124),
            OxyColor.FromRgb(173, 52, 124),
            OxyColor.FromRgb(174, 52, 123),
            OxyColor.FromRgb(176, 53, 123),
            OxyColor.FromRgb(178, 53, 123),
            OxyColor.FromRgb(179, 54, 122),
            OxyColor.FromRgb(181, 54, 122),
            OxyColor.FromRgb(183, 55, 121),
            OxyColor.FromRgb(184, 55, 121),
            OxyColor.FromRgb(186, 56, 120),
            OxyColor.FromRgb(188, 57, 120),
            OxyColor.FromRgb(189, 57, 119),
            OxyColor.FromRgb(191, 58, 119),
            OxyColor.FromRgb(192, 58, 118),
            OxyColor.FromRgb(194, 59, 117),
            OxyColor.FromRgb(196, 60, 117),
            OxyColor.FromRgb(197, 60, 116),
            OxyColor.FromRgb(199, 61, 115),
            OxyColor.FromRgb(200, 62, 115),
            OxyColor.FromRgb(202, 62, 114),
            OxyColor.FromRgb(204, 63, 113),
            OxyColor.FromRgb(205, 64, 113),
            OxyColor.FromRgb(207, 64, 112),
            OxyColor.FromRgb(208, 65, 111),
            OxyColor.FromRgb(210, 66, 111),
            OxyColor.FromRgb(211, 67, 110),
            OxyColor.FromRgb(213, 68, 109),
            OxyColor.FromRgb(214, 69, 108),
            OxyColor.FromRgb(216, 69, 108),
            OxyColor.FromRgb(217, 70, 107),
            OxyColor.FromRgb(219, 71, 106),
            OxyColor.FromRgb(220, 72, 105),
            OxyColor.FromRgb(222, 73, 104),
            OxyColor.FromRgb(223, 74, 104),
            OxyColor.FromRgb(224, 76, 103),
            OxyColor.FromRgb(226, 77, 102),
            OxyColor.FromRgb(227, 78, 101),
            OxyColor.FromRgb(228, 79, 100),
            OxyColor.FromRgb(229, 80, 100),
            OxyColor.FromRgb(231, 82, 99),
            OxyColor.FromRgb(232, 83, 98),
            OxyColor.FromRgb(233, 84, 98),
            OxyColor.FromRgb(234, 86, 97),
            OxyColor.FromRgb(235, 87, 96),
            OxyColor.FromRgb(236, 88, 96),
            OxyColor.FromRgb(237, 90, 95),
            OxyColor.FromRgb(238, 91, 94),
            OxyColor.FromRgb(239, 93, 94),
            OxyColor.FromRgb(240, 95, 94),
            OxyColor.FromRgb(241, 96, 93),
            OxyColor.FromRgb(242, 98, 93),
            OxyColor.FromRgb(242, 100, 92),
            OxyColor.FromRgb(243, 101, 92),
            OxyColor.FromRgb(244, 103, 92),
            OxyColor.FromRgb(244, 105, 92),
            OxyColor.FromRgb(245, 107, 92),
            OxyColor.FromRgb(246, 108, 92),
            OxyColor.FromRgb(246, 110, 92),
            OxyColor.FromRgb(247, 112, 92),
            OxyColor.FromRgb(247, 114, 92),
            OxyColor.FromRgb(248, 116, 92),
            OxyColor.FromRgb(248, 118, 92),
            OxyColor.FromRgb(249, 120, 93),
            OxyColor.FromRgb(249, 121, 93),
            OxyColor.FromRgb(249, 123, 93),
            OxyColor.FromRgb(250, 125, 94),
            OxyColor.FromRgb(250, 127, 94),
            OxyColor.FromRgb(250, 129, 95),
            OxyColor.FromRgb(251, 131, 95),
            OxyColor.FromRgb(251, 133, 96),
            OxyColor.FromRgb(251, 135, 97),
            OxyColor.FromRgb(252, 137, 97),
            OxyColor.FromRgb(252, 138, 98),
            OxyColor.FromRgb(252, 140, 99),
            OxyColor.FromRgb(252, 142, 100),
            OxyColor.FromRgb(252, 144, 101),
            OxyColor.FromRgb(253, 146, 102),
            OxyColor.FromRgb(253, 148, 103),
            OxyColor.FromRgb(253, 150, 104),
            OxyColor.FromRgb(253, 152, 105),
            OxyColor.FromRgb(253, 154, 106),
            OxyColor.FromRgb(253, 155, 107),
            OxyColor.FromRgb(254, 157, 108),
            OxyColor.FromRgb(254, 159, 109),
            OxyColor.FromRgb(254, 161, 110),
            OxyColor.FromRgb(254, 163, 111),
            OxyColor.FromRgb(254, 165, 113),
            OxyColor.FromRgb(254, 167, 114),
            OxyColor.FromRgb(254, 169, 115),
            OxyColor.FromRgb(254, 170, 116),
            OxyColor.FromRgb(254, 172, 118),
            OxyColor.FromRgb(254, 174, 119),
            OxyColor.FromRgb(254, 176, 120),
            OxyColor.FromRgb(254, 178, 122),
            OxyColor.FromRgb(254, 180, 123),
            OxyColor.FromRgb(254, 182, 124),
            OxyColor.FromRgb(254, 183, 126),
            OxyColor.FromRgb(254, 185, 127),
            OxyColor.FromRgb(254, 187, 129),
            OxyColor.FromRgb(254, 189, 130),
            OxyColor.FromRgb(254, 191, 132),
            OxyColor.FromRgb(254, 193, 133),
            OxyColor.FromRgb(254, 194, 135),
            OxyColor.FromRgb(254, 196, 136),
            OxyColor.FromRgb(254, 198, 138),
            OxyColor.FromRgb(254, 200, 140),
            OxyColor.FromRgb(254, 202, 141),
            OxyColor.FromRgb(254, 204, 143),
            OxyColor.FromRgb(254, 205, 144),
            OxyColor.FromRgb(254, 207, 146),
            OxyColor.FromRgb(254, 209, 148),
            OxyColor.FromRgb(254, 211, 149),
            OxyColor.FromRgb(254, 213, 151),
            OxyColor.FromRgb(254, 215, 153),
            OxyColor.FromRgb(254, 216, 154),
            OxyColor.FromRgb(253, 218, 156),
            OxyColor.FromRgb(253, 220, 158),
            OxyColor.FromRgb(253, 222, 160),
            OxyColor.FromRgb(253, 224, 161),
            OxyColor.FromRgb(253, 226, 163),
            OxyColor.FromRgb(253, 227, 165),
            OxyColor.FromRgb(253, 229, 167),
            OxyColor.FromRgb(253, 231, 169),
            OxyColor.FromRgb(253, 233, 170),
            OxyColor.FromRgb(253, 235, 172),
            OxyColor.FromRgb(252, 236, 174),
            OxyColor.FromRgb(252, 238, 176),
            OxyColor.FromRgb(252, 240, 178),
            OxyColor.FromRgb(252, 242, 180),
            OxyColor.FromRgb(252, 244, 182),
            OxyColor.FromRgb(252, 246, 184),
            OxyColor.FromRgb(252, 247, 185),
            OxyColor.FromRgb(252, 249, 187),
            OxyColor.FromRgb(252, 251, 189),
            OxyColor.FromRgb(252, 253, 191)
        };

        /// <summary>
        /// The color sequence of the plasma palette.
        /// </summary>
        private static readonly OxyColor[] plasmaColors = new[]
        {
            OxyColor.FromRgb(13, 8, 135),
            OxyColor.FromRgb(16, 7, 136),
            OxyColor.FromRgb(19, 7, 137),
            OxyColor.FromRgb(22, 7, 138),
            OxyColor.FromRgb(25, 6, 140),
            OxyColor.FromRgb(27, 6, 141),
            OxyColor.FromRgb(29, 6, 142),
            OxyColor.FromRgb(32, 6, 143),
            OxyColor.FromRgb(34, 6, 144),
            OxyColor.FromRgb(36, 6, 145),
            OxyColor.FromRgb(38, 5, 145),
            OxyColor.FromRgb(40, 5, 146),
            OxyColor.FromRgb(42, 5, 147),
            OxyColor.FromRgb(44, 5, 148),
            OxyColor.FromRgb(46, 5, 149),
            OxyColor.FromRgb(47, 5, 150),
            OxyColor.FromRgb(49, 5, 151),
            OxyColor.FromRgb(51, 5, 151),
            OxyColor.FromRgb(53, 4, 152),
            OxyColor.FromRgb(55, 4, 153),
            OxyColor.FromRgb(56, 4, 154),
            OxyColor.FromRgb(58, 4, 154),
            OxyColor.FromRgb(60, 4, 155),
            OxyColor.FromRgb(62, 4, 156),
            OxyColor.FromRgb(63, 4, 156),
            OxyColor.FromRgb(65, 4, 157),
            OxyColor.FromRgb(67, 3, 158),
            OxyColor.FromRgb(68, 3, 158),
            OxyColor.FromRgb(70, 3, 159),
            OxyColor.FromRgb(72, 3, 159),
            OxyColor.FromRgb(73, 3, 160),
            OxyColor.FromRgb(75, 3, 161),
            OxyColor.FromRgb(76, 2, 161),
            OxyColor.FromRgb(78, 2, 162),
            OxyColor.FromRgb(80, 2, 162),
            OxyColor.FromRgb(81, 2, 163),
            OxyColor.FromRgb(83, 2, 163),
            OxyColor.FromRgb(85, 2, 164),
            OxyColor.FromRgb(86, 1, 164),
            OxyColor.FromRgb(88, 1, 164),
            OxyColor.FromRgb(89, 1, 165),
            OxyColor.FromRgb(91, 1, 165),
            OxyColor.FromRgb(92, 1, 166),
            OxyColor.FromRgb(94, 1, 166),
            OxyColor.FromRgb(96, 1, 166),
            OxyColor.FromRgb(97, 0, 167),
            OxyColor.FromRgb(99, 0, 167),
            OxyColor.FromRgb(100, 0, 167),
            OxyColor.FromRgb(102, 0, 167),
            OxyColor.FromRgb(103, 0, 168),
            OxyColor.FromRgb(105, 0, 168),
            OxyColor.FromRgb(106, 0, 168),
            OxyColor.FromRgb(108, 0, 168),
            OxyColor.FromRgb(110, 0, 168),
            OxyColor.FromRgb(111, 0, 168),
            OxyColor.FromRgb(113, 0, 168),
            OxyColor.FromRgb(114, 1, 168),
            OxyColor.FromRgb(116, 1, 168),
            OxyColor.FromRgb(117, 1, 168),
            OxyColor.FromRgb(119, 1, 168),
            OxyColor.FromRgb(120, 1, 168),
            OxyColor.FromRgb(122, 2, 168),
            OxyColor.FromRgb(123, 2, 168),
            OxyColor.FromRgb(125, 3, 168),
            OxyColor.FromRgb(126, 3, 168),
            OxyColor.FromRgb(128, 4, 168),
            OxyColor.FromRgb(129, 4, 167),
            OxyColor.FromRgb(131, 5, 167),
            OxyColor.FromRgb(132, 5, 167),
            OxyColor.FromRgb(134, 6, 166),
            OxyColor.FromRgb(135, 7, 166),
            OxyColor.FromRgb(136, 8, 166),
            OxyColor.FromRgb(138, 9, 165),
            OxyColor.FromRgb(139, 10, 165),
            OxyColor.FromRgb(141, 11, 165),
            OxyColor.FromRgb(142, 12, 164),
            OxyColor.FromRgb(143, 13, 164),
            OxyColor.FromRgb(145, 14, 163),
            OxyColor.FromRgb(146, 15, 163),
            OxyColor.FromRgb(148, 16, 162),
            OxyColor.FromRgb(149, 17, 161),
            OxyColor.FromRgb(150, 19, 161),
            OxyColor.FromRgb(152, 20, 160),
            OxyColor.FromRgb(153, 21, 159),
            OxyColor.FromRgb(154, 22, 159),
            OxyColor.FromRgb(156, 23, 158),
            OxyColor.FromRgb(157, 24, 157),
            OxyColor.FromRgb(158, 25, 157),
            OxyColor.FromRgb(160, 26, 156),
            OxyColor.FromRgb(161, 27, 155),
            OxyColor.FromRgb(162, 29, 154),
            OxyColor.FromRgb(163, 30, 154),
            OxyColor.FromRgb(165, 31, 153),
            OxyColor.FromRgb(166, 32, 152),
            OxyColor.FromRgb(167, 33, 151),
            OxyColor.FromRgb(168, 34, 150),
            OxyColor.FromRgb(170, 35, 149),
            OxyColor.FromRgb(171, 36, 148),
            OxyColor.FromRgb(172, 38, 148),
            OxyColor.FromRgb(173, 39, 147),
            OxyColor.FromRgb(174, 40, 146),
            OxyColor.FromRgb(176, 41, 145),
            OxyColor.FromRgb(177, 42, 144),
            OxyColor.FromRgb(178, 43, 143),
            OxyColor.FromRgb(179, 44, 142),
            OxyColor.FromRgb(180, 46, 141),
            OxyColor.FromRgb(181, 47, 140),
            OxyColor.FromRgb(182, 48, 139),
            OxyColor.FromRgb(183, 49, 138),
            OxyColor.FromRgb(184, 50, 137),
            OxyColor.FromRgb(186, 51, 136),
            OxyColor.FromRgb(187, 52, 136),
            OxyColor.FromRgb(188, 53, 135),
            OxyColor.FromRgb(189, 55, 134),
            OxyColor.FromRgb(190, 56, 133),
            OxyColor.FromRgb(191, 57, 132),
            OxyColor.FromRgb(192, 58, 131),
            OxyColor.FromRgb(193, 59, 130),
            OxyColor.FromRgb(194, 60, 129),
            OxyColor.FromRgb(195, 61, 128),
            OxyColor.FromRgb(196, 62, 127),
            OxyColor.FromRgb(197, 64, 126),
            OxyColor.FromRgb(198, 65, 125),
            OxyColor.FromRgb(199, 66, 124),
            OxyColor.FromRgb(200, 67, 123),
            OxyColor.FromRgb(201, 68, 122),
            OxyColor.FromRgb(202, 69, 122),
            OxyColor.FromRgb(203, 70, 121),
            OxyColor.FromRgb(204, 71, 120),
            OxyColor.FromRgb(204, 73, 119),
            OxyColor.FromRgb(205, 74, 118),
            OxyColor.FromRgb(206, 75, 117),
            OxyColor.FromRgb(207, 76, 116),
            OxyColor.FromRgb(208, 77, 115),
            OxyColor.FromRgb(209, 78, 114),
            OxyColor.FromRgb(210, 79, 113),
            OxyColor.FromRgb(211, 81, 113),
            OxyColor.FromRgb(212, 82, 112),
            OxyColor.FromRgb(213, 83, 111),
            OxyColor.FromRgb(213, 84, 110),
            OxyColor.FromRgb(214, 85, 109),
            OxyColor.FromRgb(215, 86, 108),
            OxyColor.FromRgb(216, 87, 107),
            OxyColor.FromRgb(217, 88, 106),
            OxyColor.FromRgb(218, 90, 106),
            OxyColor.FromRgb(218, 91, 105),
            OxyColor.FromRgb(219, 92, 104),
            OxyColor.FromRgb(220, 93, 103),
            OxyColor.FromRgb(221, 94, 102),
            OxyColor.FromRgb(222, 95, 101),
            OxyColor.FromRgb(222, 97, 100),
            OxyColor.FromRgb(223, 98, 99),
            OxyColor.FromRgb(224, 99, 99),
            OxyColor.FromRgb(225, 100, 98),
            OxyColor.FromRgb(226, 101, 97),
            OxyColor.FromRgb(226, 102, 96),
            OxyColor.FromRgb(227, 104, 95),
            OxyColor.FromRgb(228, 105, 94),
            OxyColor.FromRgb(229, 106, 93),
            OxyColor.FromRgb(229, 107, 93),
            OxyColor.FromRgb(230, 108, 92),
            OxyColor.FromRgb(231, 110, 91),
            OxyColor.FromRgb(231, 111, 90),
            OxyColor.FromRgb(232, 112, 89),
            OxyColor.FromRgb(233, 113, 88),
            OxyColor.FromRgb(233, 114, 87),
            OxyColor.FromRgb(234, 116, 87),
            OxyColor.FromRgb(235, 117, 86),
            OxyColor.FromRgb(235, 118, 85),
            OxyColor.FromRgb(236, 119, 84),
            OxyColor.FromRgb(237, 121, 83),
            OxyColor.FromRgb(237, 122, 82),
            OxyColor.FromRgb(238, 123, 81),
            OxyColor.FromRgb(239, 124, 81),
            OxyColor.FromRgb(239, 126, 80),
            OxyColor.FromRgb(240, 127, 79),
            OxyColor.FromRgb(240, 128, 78),
            OxyColor.FromRgb(241, 129, 77),
            OxyColor.FromRgb(241, 131, 76),
            OxyColor.FromRgb(242, 132, 75),
            OxyColor.FromRgb(243, 133, 75),
            OxyColor.FromRgb(243, 135, 74),
            OxyColor.FromRgb(244, 136, 73),
            OxyColor.FromRgb(244, 137, 72),
            OxyColor.FromRgb(245, 139, 71),
            OxyColor.FromRgb(245, 140, 70),
            OxyColor.FromRgb(246, 141, 69),
            OxyColor.FromRgb(246, 143, 68),
            OxyColor.FromRgb(247, 144, 68),
            OxyColor.FromRgb(247, 145, 67),
            OxyColor.FromRgb(247, 147, 66),
            OxyColor.FromRgb(248, 148, 65),
            OxyColor.FromRgb(248, 149, 64),
            OxyColor.FromRgb(249, 151, 63),
            OxyColor.FromRgb(249, 152, 62),
            OxyColor.FromRgb(249, 154, 62),
            OxyColor.FromRgb(250, 155, 61),
            OxyColor.FromRgb(250, 156, 60),
            OxyColor.FromRgb(250, 158, 59),
            OxyColor.FromRgb(251, 159, 58),
            OxyColor.FromRgb(251, 161, 57),
            OxyColor.FromRgb(251, 162, 56),
            OxyColor.FromRgb(252, 163, 56),
            OxyColor.FromRgb(252, 165, 55),
            OxyColor.FromRgb(252, 166, 54),
            OxyColor.FromRgb(252, 168, 53),
            OxyColor.FromRgb(252, 169, 52),
            OxyColor.FromRgb(253, 171, 51),
            OxyColor.FromRgb(253, 172, 51),
            OxyColor.FromRgb(253, 174, 50),
            OxyColor.FromRgb(253, 175, 49),
            OxyColor.FromRgb(253, 177, 48),
            OxyColor.FromRgb(253, 178, 47),
            OxyColor.FromRgb(253, 180, 47),
            OxyColor.FromRgb(253, 181, 46),
            OxyColor.FromRgb(254, 183, 45),
            OxyColor.FromRgb(254, 184, 44),
            OxyColor.FromRgb(254, 186, 44),
            OxyColor.FromRgb(254, 187, 43),
            OxyColor.FromRgb(254, 189, 42),
            OxyColor.FromRgb(254, 190, 42),
            OxyColor.FromRgb(254, 192, 41),
            OxyColor.FromRgb(253, 194, 41),
            OxyColor.FromRgb(253, 195, 40),
            OxyColor.FromRgb(253, 197, 39),
            OxyColor.FromRgb(253, 198, 39),
            OxyColor.FromRgb(253, 200, 39),
            OxyColor.FromRgb(253, 202, 38),
            OxyColor.FromRgb(253, 203, 38),
            OxyColor.FromRgb(252, 205, 37),
            OxyColor.FromRgb(252, 206, 37),
            OxyColor.FromRgb(252, 208, 37),
            OxyColor.FromRgb(252, 210, 37),
            OxyColor.FromRgb(251, 211, 36),
            OxyColor.FromRgb(251, 213, 36),
            OxyColor.FromRgb(251, 215, 36),
            OxyColor.FromRgb(250, 216, 36),
            OxyColor.FromRgb(250, 218, 36),
            OxyColor.FromRgb(249, 220, 36),
            OxyColor.FromRgb(249, 221, 37),
            OxyColor.FromRgb(248, 223, 37),
            OxyColor.FromRgb(248, 225, 37),
            OxyColor.FromRgb(247, 226, 37),
            OxyColor.FromRgb(247, 228, 37),
            OxyColor.FromRgb(246, 230, 38),
            OxyColor.FromRgb(246, 232, 38),
            OxyColor.FromRgb(245, 233, 38),
            OxyColor.FromRgb(245, 235, 39),
            OxyColor.FromRgb(244, 237, 39),
            OxyColor.FromRgb(243, 238, 39),
            OxyColor.FromRgb(243, 240, 39),
            OxyColor.FromRgb(242, 242, 39),
            OxyColor.FromRgb(241, 244, 38),
            OxyColor.FromRgb(241, 245, 37),
            OxyColor.FromRgb(240, 247, 36),
            OxyColor.FromRgb(240, 249, 33)
        };

        /// <summary>
        /// The color sequence of the viridis palette.
        /// </summary>
        private static readonly OxyColor[] viridisColors = new[]
        {
            OxyColor.FromRgb(68, 1, 84),
            OxyColor.FromRgb(68, 2, 86),
            OxyColor.FromRgb(69, 4, 87),
            OxyColor.FromRgb(69, 5, 89),
            OxyColor.FromRgb(70, 7, 90),
            OxyColor.FromRgb(70, 8, 92),
            OxyColor.FromRgb(70, 10, 93),
            OxyColor.FromRgb(70, 11, 94),
            OxyColor.FromRgb(71, 13, 96),
            OxyColor.FromRgb(71, 14, 97),
            OxyColor.FromRgb(71, 16, 99),
            OxyColor.FromRgb(71, 17, 100),
            OxyColor.FromRgb(71, 19, 101),
            OxyColor.FromRgb(72, 20, 103),
            OxyColor.FromRgb(72, 22, 104),
            OxyColor.FromRgb(72, 23, 105),
            OxyColor.FromRgb(72, 24, 106),
            OxyColor.FromRgb(72, 26, 108),
            OxyColor.FromRgb(72, 27, 109),
            OxyColor.FromRgb(72, 28, 110),
            OxyColor.FromRgb(72, 29, 111),
            OxyColor.FromRgb(72, 31, 112),
            OxyColor.FromRgb(72, 32, 113),
            OxyColor.FromRgb(72, 33, 115),
            OxyColor.FromRgb(72, 35, 116),
            OxyColor.FromRgb(72, 36, 117),
            OxyColor.FromRgb(72, 37, 118),
            OxyColor.FromRgb(72, 38, 119),
            OxyColor.FromRgb(72, 40, 120),
            OxyColor.FromRgb(72, 41, 121),
            OxyColor.FromRgb(71, 42, 122),
            OxyColor.FromRgb(71, 44, 122),
            OxyColor.FromRgb(71, 45, 123),
            OxyColor.FromRgb(71, 46, 124),
            OxyColor.FromRgb(71, 47, 125),
            OxyColor.FromRgb(70, 48, 126),
            OxyColor.FromRgb(70, 50, 126),
            OxyColor.FromRgb(70, 51, 127),
            OxyColor.FromRgb(70, 52, 128),
            OxyColor.FromRgb(69, 53, 129),
            OxyColor.FromRgb(69, 55, 129),
            OxyColor.FromRgb(69, 56, 130),
            OxyColor.FromRgb(68, 57, 131),
            OxyColor.FromRgb(68, 58, 131),
            OxyColor.FromRgb(68, 59, 132),
            OxyColor.FromRgb(67, 61, 132),
            OxyColor.FromRgb(67, 62, 133),
            OxyColor.FromRgb(66, 63, 133),
            OxyColor.FromRgb(66, 64, 134),
            OxyColor.FromRgb(66, 65, 134),
            OxyColor.FromRgb(65, 66, 135),
            OxyColor.FromRgb(65, 68, 135),
            OxyColor.FromRgb(64, 69, 136),
            OxyColor.FromRgb(64, 70, 136),
            OxyColor.FromRgb(63, 71, 136),
            OxyColor.FromRgb(63, 72, 137),
            OxyColor.FromRgb(62, 73, 137),
            OxyColor.FromRgb(62, 74, 137),
            OxyColor.FromRgb(62, 76, 138),
            OxyColor.FromRgb(61, 77, 138),
            OxyColor.FromRgb(61, 78, 138),
            OxyColor.FromRgb(60, 79, 138),
            OxyColor.FromRgb(60, 80, 139),
            OxyColor.FromRgb(59, 81, 139),
            OxyColor.FromRgb(59, 82, 139),
            OxyColor.FromRgb(58, 83, 139),
            OxyColor.FromRgb(58, 84, 140),
            OxyColor.FromRgb(57, 85, 140),
            OxyColor.FromRgb(57, 86, 140),
            OxyColor.FromRgb(56, 88, 140),
            OxyColor.FromRgb(56, 89, 140),
            OxyColor.FromRgb(55, 90, 140),
            OxyColor.FromRgb(55, 91, 141),
            OxyColor.FromRgb(54, 92, 141),
            OxyColor.FromRgb(54, 93, 141),
            OxyColor.FromRgb(53, 94, 141),
            OxyColor.FromRgb(53, 95, 141),
            OxyColor.FromRgb(52, 96, 141),
            OxyColor.FromRgb(52, 97, 141),
            OxyColor.FromRgb(51, 98, 141),
            OxyColor.FromRgb(51, 99, 141),
            OxyColor.FromRgb(50, 100, 142),
            OxyColor.FromRgb(50, 101, 142),
            OxyColor.FromRgb(49, 102, 142),
            OxyColor.FromRgb(49, 103, 142),
            OxyColor.FromRgb(49, 104, 142),
            OxyColor.FromRgb(48, 105, 142),
            OxyColor.FromRgb(48, 106, 142),
            OxyColor.FromRgb(47, 107, 142),
            OxyColor.FromRgb(47, 108, 142),
            OxyColor.FromRgb(46, 109, 142),
            OxyColor.FromRgb(46, 110, 142),
            OxyColor.FromRgb(46, 111, 142),
            OxyColor.FromRgb(45, 112, 142),
            OxyColor.FromRgb(45, 113, 142),
            OxyColor.FromRgb(44, 113, 142),
            OxyColor.FromRgb(44, 114, 142),
            OxyColor.FromRgb(44, 115, 142),
            OxyColor.FromRgb(43, 116, 142),
            OxyColor.FromRgb(43, 117, 142),
            OxyColor.FromRgb(42, 118, 142),
            OxyColor.FromRgb(42, 119, 142),
            OxyColor.FromRgb(42, 120, 142),
            OxyColor.FromRgb(41, 121, 142),
            OxyColor.FromRgb(41, 122, 142),
            OxyColor.FromRgb(41, 123, 142),
            OxyColor.FromRgb(40, 124, 142),
            OxyColor.FromRgb(40, 125, 142),
            OxyColor.FromRgb(39, 126, 142),
            OxyColor.FromRgb(39, 127, 142),
            OxyColor.FromRgb(39, 128, 142),
            OxyColor.FromRgb(38, 129, 142),
            OxyColor.FromRgb(38, 130, 142),
            OxyColor.FromRgb(38, 130, 142),
            OxyColor.FromRgb(37, 131, 142),
            OxyColor.FromRgb(37, 132, 142),
            OxyColor.FromRgb(37, 133, 142),
            OxyColor.FromRgb(36, 134, 142),
            OxyColor.FromRgb(36, 135, 142),
            OxyColor.FromRgb(35, 136, 142),
            OxyColor.FromRgb(35, 137, 142),
            OxyColor.FromRgb(35, 138, 141),
            OxyColor.FromRgb(34, 139, 141),
            OxyColor.FromRgb(34, 140, 141),
            OxyColor.FromRgb(34, 141, 141),
            OxyColor.FromRgb(33, 142, 141),
            OxyColor.FromRgb(33, 143, 141),
            OxyColor.FromRgb(33, 144, 141),
            OxyColor.FromRgb(33, 145, 140),
            OxyColor.FromRgb(32, 146, 140),
            OxyColor.FromRgb(32, 146, 140),
            OxyColor.FromRgb(32, 147, 140),
            OxyColor.FromRgb(31, 148, 140),
            OxyColor.FromRgb(31, 149, 139),
            OxyColor.FromRgb(31, 150, 139),
            OxyColor.FromRgb(31, 151, 139),
            OxyColor.FromRgb(31, 152, 139),
            OxyColor.FromRgb(31, 153, 138),
            OxyColor.FromRgb(31, 154, 138),
            OxyColor.FromRgb(30, 155, 138),
            OxyColor.FromRgb(30, 156, 137),
            OxyColor.FromRgb(30, 157, 137),
            OxyColor.FromRgb(31, 158, 137),
            OxyColor.FromRgb(31, 159, 136),
            OxyColor.FromRgb(31, 160, 136),
            OxyColor.FromRgb(31, 161, 136),
            OxyColor.FromRgb(31, 161, 135),
            OxyColor.FromRgb(31, 162, 135),
            OxyColor.FromRgb(32, 163, 134),
            OxyColor.FromRgb(32, 164, 134),
            OxyColor.FromRgb(33, 165, 133),
            OxyColor.FromRgb(33, 166, 133),
            OxyColor.FromRgb(34, 167, 133),
            OxyColor.FromRgb(34, 168, 132),
            OxyColor.FromRgb(35, 169, 131),
            OxyColor.FromRgb(36, 170, 131),
            OxyColor.FromRgb(37, 171, 130),
            OxyColor.FromRgb(37, 172, 130),
            OxyColor.FromRgb(38, 173, 129),
            OxyColor.FromRgb(39, 173, 129),
            OxyColor.FromRgb(40, 174, 128),
            OxyColor.FromRgb(41, 175, 127),
            OxyColor.FromRgb(42, 176, 127),
            OxyColor.FromRgb(44, 177, 126),
            OxyColor.FromRgb(45, 178, 125),
            OxyColor.FromRgb(46, 179, 124),
            OxyColor.FromRgb(47, 180, 124),
            OxyColor.FromRgb(49, 181, 123),
            OxyColor.FromRgb(50, 182, 122),
            OxyColor.FromRgb(52, 182, 121),
            OxyColor.FromRgb(53, 183, 121),
            OxyColor.FromRgb(55, 184, 120),
            OxyColor.FromRgb(56, 185, 119),
            OxyColor.FromRgb(58, 186, 118),
            OxyColor.FromRgb(59, 187, 117),
            OxyColor.FromRgb(61, 188, 116),
            OxyColor.FromRgb(63, 188, 115),
            OxyColor.FromRgb(64, 189, 114),
            OxyColor.FromRgb(66, 190, 113),
            OxyColor.FromRgb(68, 191, 112),
            OxyColor.FromRgb(70, 192, 111),
            OxyColor.FromRgb(72, 193, 110),
            OxyColor.FromRgb(74, 193, 109),
            OxyColor.FromRgb(76, 194, 108),
            OxyColor.FromRgb(78, 195, 107),
            OxyColor.FromRgb(80, 196, 106),
            OxyColor.FromRgb(82, 197, 105),
            OxyColor.FromRgb(84, 197, 104),
            OxyColor.FromRgb(86, 198, 103),
            OxyColor.FromRgb(88, 199, 101),
            OxyColor.FromRgb(90, 200, 100),
            OxyColor.FromRgb(92, 200, 99),
            OxyColor.FromRgb(94, 201, 98),
            OxyColor.FromRgb(96, 202, 96),
            OxyColor.FromRgb(99, 203, 95),
            OxyColor.FromRgb(101, 203, 94),
            OxyColor.FromRgb(103, 204, 92),
            OxyColor.FromRgb(105, 205, 91),
            OxyColor.FromRgb(108, 205, 90),
            OxyColor.FromRgb(110, 206, 88),
            OxyColor.FromRgb(112, 207, 87),
            OxyColor.FromRgb(115, 208, 86),
            OxyColor.FromRgb(117, 208, 84),
            OxyColor.FromRgb(119, 209, 83),
            OxyColor.FromRgb(122, 209, 81),
            OxyColor.FromRgb(124, 210, 80),
            OxyColor.FromRgb(127, 211, 78),
            OxyColor.FromRgb(129, 211, 77),
            OxyColor.FromRgb(132, 212, 75),
            OxyColor.FromRgb(134, 213, 73),
            OxyColor.FromRgb(137, 213, 72),
            OxyColor.FromRgb(139, 214, 70),
            OxyColor.FromRgb(142, 214, 69),
            OxyColor.FromRgb(144, 215, 67),
            OxyColor.FromRgb(147, 215, 65),
            OxyColor.FromRgb(149, 216, 64),
            OxyColor.FromRgb(152, 216, 62),
            OxyColor.FromRgb(155, 217, 60),
            OxyColor.FromRgb(157, 217, 59),
            OxyColor.FromRgb(160, 218, 57),
            OxyColor.FromRgb(162, 218, 55),
            OxyColor.FromRgb(165, 219, 54),
            OxyColor.FromRgb(168, 219, 52),
            OxyColor.FromRgb(170, 220, 50),
            OxyColor.FromRgb(173, 220, 48),
            OxyColor.FromRgb(176, 221, 47),
            OxyColor.FromRgb(178, 221, 45),
            OxyColor.FromRgb(181, 222, 43),
            OxyColor.FromRgb(184, 222, 41),
            OxyColor.FromRgb(186, 222, 40),
            OxyColor.FromRgb(189, 223, 38),
            OxyColor.FromRgb(192, 223, 37),
            OxyColor.FromRgb(194, 223, 35),
            OxyColor.FromRgb(197, 224, 33),
            OxyColor.FromRgb(200, 224, 32),
            OxyColor.FromRgb(202, 225, 31),
            OxyColor.FromRgb(205, 225, 29),
            OxyColor.FromRgb(208, 225, 28),
            OxyColor.FromRgb(210, 226, 27),
            OxyColor.FromRgb(213, 226, 26),
            OxyColor.FromRgb(216, 226, 25),
            OxyColor.FromRgb(218, 227, 25),
            OxyColor.FromRgb(221, 227, 24),
            OxyColor.FromRgb(223, 227, 24),
            OxyColor.FromRgb(226, 228, 24),
            OxyColor.FromRgb(229, 228, 25),
            OxyColor.FromRgb(231, 228, 25),
            OxyColor.FromRgb(234, 229, 26),
            OxyColor.FromRgb(236, 229, 27),
            OxyColor.FromRgb(239, 229, 28),
            OxyColor.FromRgb(241, 229, 29),
            OxyColor.FromRgb(244, 230, 30),
            OxyColor.FromRgb(246, 230, 32),
            OxyColor.FromRgb(248, 230, 33),
            OxyColor.FromRgb(251, 231, 35),
            OxyColor.FromRgb(253, 231, 37)
        };

        /// <summary>
        /// Gets the cividis palette.
        /// </summary>
        public static OxyPalette Cividis(int numberOfColors = 256)
        {
            if (numberOfColors == cividisColors.Length)
            {
                return new OxyPalette(cividisColors);
            }

            return OxyPalette.Interpolate(numberOfColors, cividisColors);
        }

        /// <summary>
        /// Gets the inferno palette.
        /// </summary>
        public static OxyPalette Inferno(int numberOfColors = 256)
        {
            if (numberOfColors == infernoColors.Length)
            {
                return new OxyPalette(infernoColors);
            }

            return OxyPalette.Interpolate(numberOfColors, infernoColors);
        }

        /// <summary>
        /// Gets the magma palette.
        /// </summary>
        public static OxyPalette Magma(int numberOfColors = 256)
        {
            if (numberOfColors == magmaColors.Length)
            {
                return new OxyPalette(magmaColors);
            }

            return OxyPalette.Interpolate(numberOfColors, magmaColors);
        }

        /// <summary>
        /// Gets the plasma palette.
        /// </summary>
        public static OxyPalette Plasma(int numberOfColors = 256)
        {
            if (numberOfColors == plasmaColors.Length)
            {
                return new OxyPalette(plasmaColors);
            }

            return OxyPalette.Interpolate(numberOfColors, plasmaColors);
        }

        /// <summary>
        /// Gets the viridis palette.
        /// </summary>
        public static OxyPalette Viridis(int numberOfColors = 256)
        {
            if (numberOfColors == viridisColors.Length)
            {
                return new OxyPalette(viridisColors);
            }

            return OxyPalette.Interpolate(numberOfColors, viridisColors);
        }
    }
}
